using System.Collections.Generic;
using System.Text.Json.Serialization;
using JlPay.Sdk.Models;
using JlPay.Sdk.Models.Trans.Dto;

namespace JlPay.Sdk.Models.Trans.B2c
{
    /// <summary>
    /// 微支付预授权响应
    /// </summary>
    public class MicroPayPreAuthResponse : StandardResponse
    {
        /// <summary>
        /// 状态 1：待确认 2：成功 3：失败
        /// </summary>
        [JsonPropertyName("status")]
        public string? Status { get; set; }

        /// <summary>
        /// 商户号
        /// </summary>
        [JsonPropertyName("mch_id")]
        public string? MchId { get; set; }

        /// <summary>
        /// 终端号
        /// </summary>
        [JsonPropertyName("term_no")]
        public string? TermNo { get; set; }

        /// <summary>
        /// 终端设备号
        /// </summary>
        [JsonPropertyName("device_info")]
        public string? DeviceInfo { get; set; }

        /// <summary>
        /// 授权码
        /// </summary>
        [JsonPropertyName("guarantee_auth_code")]
        public string? GuaranteeAuthCode { get; set; }

        /// <summary>
        /// 平台订单号
        /// </summary>
        [JsonPropertyName("transaction_id")]
        public string? TransactionId { get; set; }

        /// <summary>
        /// 外部订单号
        /// </summary>
        [JsonPropertyName("out_trade_no")]
        public string? OutTradeNo { get; set; }

        /// <summary>
        /// 渠道订单号
        /// </summary>
        [JsonPropertyName("chn_transaction_id")]
        public string? ChnTransactionId { get; set; }

        /// <summary>
        /// 交易金额
        /// </summary>
        [JsonPropertyName("total_fee")]
        public string? TotalFee { get; set; }

        /// <summary>
        /// 订单时间
        /// </summary>
        [JsonPropertyName("order_time")]
        public string? OrderTime { get; set; }

        /// <summary>
        /// 交易时间
        /// </summary>
        [JsonPropertyName("trans_time")]
        public string? TransTime { get; set; }

        /// <summary>
        /// 实际付款金额
        /// </summary>
        [JsonPropertyName("finnal_amount")]
        public string? FinnalAmount { get; set; }

        /// <summary>
        /// 优惠总金额
        /// </summary>
        [JsonPropertyName("discount_amount")]
        public string? DiscountAmount { get; set; }

        /// <summary>
        /// 优惠活动名称
        /// </summary>
        [JsonPropertyName("discount_name")]
        public string? DiscountName { get; set; }

        /// <summary>
        /// 优惠详情
        /// </summary>
        [JsonPropertyName("coupon_info")]
        public List<CouponInfoDto>? CouponInfo { get; set; }

        /// <summary>
        /// 交易类型
        /// </summary>
        [JsonPropertyName("pay_type")]
        public string? PayType { get; set; }

        /// <summary>
        /// 用户openid
        /// </summary>
        [JsonPropertyName("sub_openid")]
        public string? SubOpenid { get; set; }
    }
} 